cmake_minimum_required(VERSION 2.6)

set(PROJECT_NAME QMapControlTest)
project(${PROJECT_NAME})

include_directories(${CMAKE_SOURCE_DIR}/../QMapControl)
#Libraries:
add_subdirectory(../QMapControl ${CMAKE_CURRENT_BINARY_DIR}/QMapControl)

FIND_PACKAGE(Qt4 REQUIRED)

file(GLOB SOURCES "*.cpp")
file(GLOB HEADERS "*.h")

QT4_WRAP_CPP(HEADERS_MOC ${HEADERS})

SET(QT_USE_QTNETWORK TRUE)
SET(QT_USE_QTXML TRUE)
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})

ADD_EXECUTABLE(qmaptest ${SOURCES} ${HEADERS} ${HEADERS_MOC})
TARGET_LINK_LIBRARIES(qmaptest ${QT_LIBRARIES} qmapcontrol)
